package routers

import (
	"deliv-eat/handlers"
	"github.com/gin-contrib/cors"
	"github.com/gin-gonic/gin"
)

func Init() *gin.Engine {

	r := gin.Default()
	r.Use(cors.Default())
	r.Static("static", "./static")

	r.POST("/deli/add", handlers.DeliAdd)
	r.GET("/deli/list", handlers.DeliList)
	r.GET("/deli/lists", handlers.UserList)

	return r
}
